Page({
  onLoad({id}){
    console.log(id);
this.getHouseDetail(id)
  },
  // 获取房屋详情
 async getHouseDetail(id){
  if (!id) return
    const {data:houseDetail } = await wx.http({
      url:`/room/${id}`,
    })
    this.setData({...houseDetail })

  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id='+this.data.id,
    })
  },
})
